<?php /* Smarty version Smarty-3.1.14, created on 2017-08-25 11:53:35
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\nav_edit.html" */ ?>
<?php /*%%SmartyHeaderCode:145645996ab42821084-64670176%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a80f92644b9048392d7dabdd7d004b8884135062' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\nav_edit.html',
      1 => 1503454139,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '145645996ab42821084-64670176',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_5996ab428c0eb4_68042101',
  'variables' => 
  array (
    'edit' => 0,
    'aj' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5996ab428c0eb4_68042101')) {function content_5996ab428c0eb4_68042101($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<style>
td {	font-weight: bold;}
.input {	width: 200px;}
textarea {	width: 350px;	height: 100px;}
select {	width: 150px;}
.active_body {	display: none;	min-height: 500px;}
.active_nav {	font-weight: bold;	background: #8AD7D7;}
.fixed-nav ul li {	cursor: pointer;}
.tishi{color:#999;margin-top:5px;}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>编辑导航</h3>
  </div>
</div>
<div class="fixed_bottom">
  <form method="post" action="nav_list.php" id="aspnetForm" name="form1" enctype="multipart/form-data">
    <div class="active_body" style="display:block;">
      <table style=" width:100%;" cellpadding="0" cellspacing="0" class="table tb-type2">
        <tr>
          <td class="firtd"> 名称:</td>
          <td>
              <input type="text" class="input" id="name_aj" name="name" required value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['name'];?>
"> *<span id="sp" style="color:#f00"></span>
              <input type="hidden" name="act" value="edit">
              <input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['id'];?>
">
              <input type="hidden" name="aj" value="<?php echo $_smarty_tpl->tpl_vars['aj']->value['nav'];?>
">
          </td>
        </tr>
        <tr>
          <td class="firtd"> 链接地址:</td>
          <td>
              <input type="text" class="input" name="url" required value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['url'];?>
"> *
          </td>
        </tr>
        <tr>
          <td class="firtd"> 排序:</td>
          <td>
              <input onkeyup="this.value=this.value.replace(/\D/g,'')" type="text" class="input" name="vieworder" required value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['vieworder'];?>
"> *
          </td>
        </tr>
        <tr>
          <td class="firtd"> 位置:</td>
          <td>
              <select name="type" id="" required>
                <option value='' id="option">请选择...</option>
                <option value='top' required <?php if ($_smarty_tpl->tpl_vars['edit']->value['type']=='top'){?> selected="selected"  <?php }?>>上</option>
                <option value='middle' required <?php if ($_smarty_tpl->tpl_vars['edit']->value['type']=='middle'){?> selected="selected"  <?php }?>>中间</option>
                <option value='bottom' required <?php if ($_smarty_tpl->tpl_vars['edit']->value['type']=='bottom'){?> selected="selected"  <?php }?>>下</option>
              </select>
          </td>
        </tr> 
        <tr>
          <td class="firtd"> <?php echo $_smarty_tpl->tpl_vars['edit']->value['ifshow'];?>
是否显示:</td>
          <td>
            <input style="width:30px;cursor:pointer;" type="radio" name="ifshow" value="0" <?php if ($_smarty_tpl->tpl_vars['edit']->value['ifshow']==0){?> checked="checked" <?php }?>>显示
            <input style="width:30px;cursor:pointer;" type="radio" name="ifshow" value="1" <?php if ($_smarty_tpl->tpl_vars['edit']->value['ifshow']==1){?> checked="checked" <?php }?>>不显示
          </td>
        </tr>
        <tr>
          <td class="firtd"><?php echo $_smarty_tpl->tpl_vars['edit']->value['ifshow'];?>
是否新窗口:</td>
          <td>
            <input style="width:30px;cursor:pointer;" type="radio" name="opennew" value="0" <?php if ($_smarty_tpl->tpl_vars['edit']->value['opennew']==0){?> checked="checked" <?php }?>>显示
            <input style="width:30px;cursor:pointer;" type="radio" name="opennew" value="1" <?php if ($_smarty_tpl->tpl_vars['edit']->value['opennew']==1){?> checked="checked" <?php }?>>不显示
          </td>
        </tr>
      </table>
    </div>
    <div style="text-align:center">
      <div class="style1">&nbsp;</div>
      <div> <a href="JavaScript:void(0);" class="btn" onclick="reset()"><span>重置</span></a> <a href="JavaScript:void(0);" class="btn" onclick="$('#tj').click()"><span>确认提交</span></a> </div>
    </div>
    <input type="reset" id="cz" style="display: none;">
    <input type="submit" id="tj" style="display:none;">
  </form>
</div>
</body>
<script>
//ajax判断用户名是否存在
$("#name_aj").blur(function(){
　　var username = $(this).val();
　　var url = "nav_list.php?act=edit"; //跳转到判断页面
	if(username){
		　//下面是运行ajax,进入changeUrl页面，传入name，返回result
	　　$.post(url ,{name_aj:username},function(result){
	　　  if(result == '1'){
	　　　 $("#sp").html("名称已存在！");
	　　  }else{
	　　　 $("#sp").html("可以使用！");
	　　  }
	　　})
	}else{
		$("#sp").html("名称不能为空！");
	}
　
})
// 重置方法
function reset(){
	$('input').val('');
	$('textarea').text('');
	$('select').val('');
}
//获取焦点的时候
function quyush(th,cla){
	var id=$(th).val();
	$.post("shop_ajax.php?act=qysh",{id:id},function(data){
		if(data){
			$("select[name="+cla+"]").html(data);
		}else{
			$("select[name="+cla+"]").html("<option value='0'>暂无</option>");
		}
		
	})
}
// 商品添加点击切换内容模块
$(".fixed-nav>ul>li").click(function(){ 
  $(this).addClass('active_nav').siblings().removeClass('active_nav');
  var index=$(this).index();
  $(".active_body").eq(index).show().siblings(".active_body").hide();
});
//点击切换上下架的value值
$(".upper").click(function(){
  val=$(this).val();
  if(val==1){
    $(this).attr("value","0");
  }else{
    $(this).attr("value","1");
  }
});
/*图片改变的时候获取元素内容*/
function get_imgval(th){
	var str=$(th).val();
	var arr=str.split('\\');//注split可以用字符或字符串分割 
	var con=arr[arr.length-1];//这就是要取得的图片名称 
	$(th).siblings("input[type='text']").val(con);
}
</script>
</html><?php }} ?>